<?php


namespace App\Admin\Forms\Config;


use App\Models\Config\SystemData;
use Illuminate\Support\Arr;

class SiteConfig extends JsonConfigForm
{

    public static function label() :array
    {
        return [
            "address"=>"联系地址",
            "tel"=>"联系电话",
            "email"=>"邮箱地址",
            "customer_service" => "客服电话",
            "copyright"=>"版权信息",
            "icp"=>"备案信息",
        ];
    }

    public function configKey(): string
    {
        return SystemData::DATA_SITE_INFO;
    }

    public function configName() :string
    {
        return "网站信息";
    }


    public function form()
    {
        $label = static::label();

        $this->text("address",Arr::get($label,"address"));
        $this->email("email",Arr::get($label,"email"));
        $this->tel("tel",Arr::get($label,"tel"));
        $this->tel("customer_service",Arr::get($label,"customer_service"));
        $this->text("icp",Arr::get($label,"icp"));
        $this->text("copyright",Arr::get($label,"copyright"));
    }

}
